<?php include($folder.'/layouts/templates/backend/header.tpl') ?>
<?php
$master['action'] = null;
$master['attributes'] = null;
$master['pageTitle'] = 'Képek a főoldalon';
$master['toolbarItems'] = array(
	'<input type="button" value="Vissza" class="button" onclick="javascript:window.location.href=\''.$prefix.'/adminisztracio\'" />'
);
?>
<?php include($folder.'/layouts/templates/backend/middle.tpl') ?>
<?php if (!empty($_SESSION['id'])): ?>
<table>
<tr>
<?php $content['itemsPerPage'] = 12 ?>
<?php echo extendedTable(array(
	'header' => 
		'<table cellpadding="0" cellspacing="0" style="width:100%"><tr><td style="width:100%">'.
		paginator(array(
			'id' => 'main',
			'itemsPerPageAll' => array(4,8,12,24,48,96),
			'selectCountMethod' => 'kepekAFooldalon_select_count',
			'itemsPerPage' => $content['itemsPerPage'])).
		'</td><td style="white-space:nowrap"><input type="button" value="Hozzáadás" class="button" '.
		'onclick="window.open(\'/valaszto/kep?hivo=2\',\'PicturePickup\',\'status=no,toolbar=no,menu=no,location=no,directories=no,'.
		'scrollbars=yes,width=900,height=650\');" />&nbsp;<input type="submit" value="Törlés" name="submitaction_mainpicture_delete" class="button" onclick="return confirm(\'Biztos, hogy el szeretnéd távolítani a kiválasztott képeket az üdvözlő képernyőről?\')" /></td></tr></table>',
	'body' => dataList(array(
		'id' => 'main',
		'block' => 0,
		'itemsPerPage' => $content['itemsPerPage'],
		'cellTemplate' =>
		'<table>
			<tr>
				<td><label for="picture{id}"><img src="'.$prefix.'/kep-kicsi?id={pictureID}" /></label></td>
			</tr>
			<tr>
				<td>
					<center>
					<input type="checkbox" name="main[picture_id][]" value="{id}" id="picture{id}" />
					</center>
				</td>
			</tr>
		</table>',
		'selectMethod' => 'kepekAFooldalon_select',
		'columnCount' => 4)),
	'footer' => paginator(array(
		'id' => 'main',
		'itemsPerPageAll' => array(4,8,12,24,48,96),
		'selectCountMethod' => 'kepekAFooldalon_select_count',
		'itemsPerPage' => $content['itemsPerPage'])))) ?>
<?php endif; ?>
<?php include($folder.'/layouts/templates/backend/footer.tpl') ?>